package cn.micai.base.string;

/**
 * 描述：
 * <p>
 *
 * @author: 赵新国
 * @date: 2018/6/11 10:58
 */
public class StringStartsWithExample {

    public static void main(String [] args) {

        String str = "java2blog";

        if (str.startsWith("java")) {
            System.out.println("String starts with java");
        } else {
            System.out.println("String does not start with java");
        }

        if (str.startsWith("JAVA")) {
            System.out.println("String starts with JAVA");
        } else {
            System.out.println("String does not start with JAVA");
        }

    }
}
